<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=">
<title>Edición de perfil</title>

<link rel="stylesheet"
	href="<%=request.getContextPath()%>/style/gen-style.css"
	type="text/css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/style/mkv/jquery-ui.css"
	type="text/css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/style/makovo-style.css"
	type="text/css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/style/jquery.steps.css"
	type="text/css" />
<style type="text/css">
.t-box {
	height: 20px;
	width: 190px;
}

select.t-box {
	width: 200px;
}
</style>

<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/jquery-2.1.3.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/gen.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/inegi.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/spin.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/pdfobject_source.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/scripts/jquery.ajaxfileupload.js"></script>
<script type="text/javascript">
	var mPDF;
	var mVal = new Gen.Validator('val');

	$(document).ready(function() {
		function getApplicantInfo() {
			new Gen.AjaxCall().get('ApplicantInfo', {}, function(a) {
				if (a != null) {
					fillApInfo(a.a);
					fillDocsInfo(a.a.mDocs);
					fillSocInfo(a.s);
					fillProjInfo(a.p);
					createAccordion(a.a.step);

					hideOverlay();
				}
			}, function(er) {
			});
		}

		$('.pdf-item').click(function() {
			if ($(this).attr('path') != null)
				showPDF($(this).attr('path'));
			else
				$('#error-mod').dialog('open');
		});

		$('#pdf-document').dialog({
			autoOpen : false,
			modal : true,
			width : 900,
			height : 770,
			open : function(event, ui) {

			},
			close : function(event, ui) {
			}
		});

		$('#basic-info,#soc-info,#proj-info,#doc-info,#home-info').change(function() {
			if ($(this).is(':checked')) {
				$('.' + this.id).find('input').removeAttr('disabled');
				$('.' + this.id).find('select').removeAttr('disabled');
			} else {
				$('.' + this.id).find('input').attr('disabled', 'disabled');
				$('.' + this.id).find('select').attr('disabled', 'disabled');
			}

		});

		$('#b-state,#ent-state,#proj-state').change(function() {
			var stateId = $(this).val();
			var state = findValue(Inegi.states, 'id', stateId);
			var me = this.id.split("-")[0];
			$('#' + me + '-loc').find('option').remove();
			$('#' + me + '-loc').append($('<option value="-1">... Seleccione una opción ...</option>'))
			$('#' + me + '-lonng').val("");
			$('#' + me + '-lat').val("");

			Inegi.getCities($('#' + me + '-city'), stateId, true);
		});

		$('#b-city,#ent-city,#proj-city').change(function() {
			var cityId = $(this).val();
			var me = this.id.split("-")[0];
			Inegi.getTowns($('#' + me + '-loc'), $('#' + me + '-state').val(), cityId, true);

			var selCity = findValue(Inegi.cities, 'clave_municipio', cityId);

			$('#' + me + '-lonng').val(selCity.lng);
			$('#' + me + '-lat').val(selCity.lat);
		});

		$('#b-loc,#ent-loc,#proj-loc').change(function() {
			var locId = $(this).val();

			$('[name=loc]').val($('[name=locId] :selected').text());
		});

		$('input[type="file"]').ajaxfileupload({
			action : 'UploadFile',
			onStart : function() {
				showOverlay(true)
			},
			onComplete : function(r) {
				hideOverlay();
				if ($(r).html() != "")
					if (JSON.parse($(r).html())['remote-file'] != null) {
						getAplicantFiles();
					} else {
						$('#error-text').html("Error al subir archivo");
						$('#error-mod').dialog('open');
					}
				else {
					$('#error-text').html("Error al subir archivo");
					$('#error-mod').dialog('open');
				}

			}
		});

		$('#save-changes').click(function() {
			if (!validate())
				return;

			showOverlay(true);

			if (!saveBasicInfo(saveSocInfo))
				return;
		});

		function showPDF(u) {
			mPDF = new PDFObject({
				url : u,
				height : 700
			}).embed('pdf-viewer');

			$('#pdf-document').dialog('open');
		}

		function validate() {
			var bi = validateBasicInfo();
			var si = validateSocInfo();
			var pi = validateProjInfo();

			return (bi && si && pi);
		}

		function validateBasicInfo() {
			if (!$('#basic-info').is(':checked'))
				return true;

			var wrongs = mVal.validate($('#basic-info-container'), function() {

			});

			return wrongs.length == 0;
		}

		function saveBasicInfo(afterFunc) {
			if (!$('#basic-info').is(':checked')) {
				if (afterFunc != null)
					afterFunc(saveProjInfo);

				return;
			}

			var first_name = $('#name').val();
			var last_name = $('#last-name').val();
			var second_last_name = $('#second-last').val();
			var bitrh = $('#birth').val();
			var type_id = $('#idType').val();
			var fol_id = $('#fol-id').val();
			var civ = $('#civState').val();
			var phone = $('#phone').val();

			var state = $('#b-state :selected').text()
			var state_id = $('#b-state :selected').val()
			var city = $('#b-city :selected').text()
			var city_id = $('#b-city :selected').val()
			var loc = $('#b-loc :selected').text()
			var loc_id = $('#b-loc :selected').val()
			var cp = $('#b-cp').val();
			var street = $('#b-street').val();
			var ext_num = $('#b-ext-num').val();
			var int_num = $('#b-int-num').val();
			var lonng = $('#b-lonng').val();
			var lat = $('#b-lat').val();

			var data = {
				"m" : "bi",
				"first-name" : first_name,
				"last-name" : last_name,
				"second-last-name" : second_last_name,
				"bitrh" : bitrh,
				"type-id" : type_id,
				"fol-id" : fol_id,
				"civ" : civ,
				"phone" : phone,

				"state" : state,
				"state-id" : state_id,
				"city" : city,
				"city-id" : city_id,
				"loc" : loc,
				"loc-id" : loc_id,
				"cp" : cp,
				"street" : street,
				"ext-num" : ext_num,
				"int-num" : int_num,
				"lonng" : lonng,
				"lat" : lat
			};

			new Gen.AjaxCall().post('EditProfile', data, function(r) {
				if (r) {
					if (afterFunc != null)
						afterFunc(saveProjInfo);
				} else
					hideOverlay();
			}, function(er) {
				hideOverlay();
			});
		}

		function validateSocInfo() {
			if (!$('#soc-info').is(':checked'))
				return true;

			var wrongs = mVal.validate($('#soc-info-container'), function() {

			});

			return wrongs.length == 0;
		}

		var saveSocInfo = function(afterfunc) {
			if (!$('#soc-info').is(':checked')) {
				if (afterfunc != null)
					afterfunc();

				return;
			}

			var ant = $('#ant').val();
			var dependants = $('#dependants').val();
			var job_type_id = $('#job-type').val();
			var ent = $('#ent').val();
			var earn = $('#earn').val();
			var job = $('#job').val();

			var state = $('#ent-state :selected').text()
			var state_id = $('#ent-state :selected').val()
			var city = $('#ent-city :selected').text()
			var city_id = $('#ent-city :selected').val()
			var loc = $('#ent-loc :selected').text()
			var loc_id = $('#ent-loc :selected').val()
			var cp = $('#ent-cp').val();
			var street = $('#ent-street').val();
			var ext_num = $('#ent-ext-num').val();
			var int_num = $('#ent-int-num').val();
			var lonng = $('#ent-lonng').val();
			var lat = $('#ent-lat').val();

			var data = {
				"m" : "si",
				"ant" : ant,
				"dependants" : dependants,
				"job-type-id" : job_type_id,
				"ent" : ent,
				"earn" : earn,
				"job" : job,

				"state" : state,
				"state-id" : state_id,
				"city" : city,
				"city-id" : city_id,
				"loc" : loc,
				"loc-id" : loc_id,
				"cp" : cp,
				"street" : street,
				"ext-num" : ext_num,
				"int-num" : int_num,
				"lonng" : lonng,
				"lat" : lat
			};

			new Gen.AjaxCall().post('EditProfile', data, function(r) {
				if (r) {
					if (afterfunc != null)
						afterfunc();
				} else
					hideOverlay();
			}, function(er) {
				hideOverlay();
			});
		}

		function validateProjInfo() {
			if (!$('#proj-info').is(':checked'))
				return true;

			var wrongs = mVal.validate($('#proj-info-container'), function() {

			});

			return wrongs.length == 0;
		}

		var saveProjInfo = function() {
			if (!$('#proj-info').is(':checked')) {
				hideOverlay();
				location.reload();
				return;
			}

			var proj_id = $('#projId').text();
			var proj_type_id = $('#projType').val();
			var proj_sett_type = $('#projSet').val();

			var state = $('#proj-state :selected').text()
			var state_id = $('#proj-state :selected').val()
			var city = $('#proj-city :selected').text()
			var city_id = $('#proj-city :selected').val()
			var loc = $('#proj-loc :selected').text();
			var loc_id = $('#proj-loc :selected').val()
			var cp = $('#proj-cp').val();
			var street = $('#proj-street').val();
			var ext_num = $('#proj-ext-num').val();
			var int_num = $('#proj-int-num').val();
			var lonng = $('#proj-lonng').val();
			var lat = $('#proj-lat').val();

			var ref_one = $('#proj-ref-one').val();
			var ref_two = $('#proj-ref-two').val();
			var vial_type = $('#proj-vial-type').val();

			var data = {
				"m" : "pi",
				"proj-id" : proj_id,
				"proj-type-id" : proj_type_id,
				"proj-sett-type" : proj_sett_type,

				"state" : state,
				"state-id" : state_id,
				"city" : city,
				"city-id" : city_id,
				"loc" : loc,
				"loc-id" : loc_id,
				"cp" : cp,
				"street" : street,
				"ext-num" : ext_num,
				"int-num" : int_num,
				"lonng" : lonng,
				"lat" : lat,

				"ref-one" : ref_one,
				"ref-two" : ref_two,
				"vial-type" : vial_type
			};

			new Gen.AjaxCall().post('EditProfile', data, function(r) {
				hideOverlay();

				if (r) {
					location.reload();
				}
			}, function(er) {
				hideOverlay();
			});
		}

		function fillApInfo(info) {
			if (info == null)
				return;

			$('#curp').text(info.curp);
			$('#name').val(info.name);
			$('#last-name').val(info.lastName);
			$('#second-last').val(info.secondLastName);
			$('#birth').val(info.birth);
			$('#phone').val(info.phone);
			$('#idType').val(info.idTypeID);
			$('#civState').val(info.idState);

			// 					$('#printFormat0').show();

			$('#b-street').val(info.address.street);
			$('#b-ext-num').val(info.address.extNum);
			$('#b-int-num').val(info.address.intNum);

			$('#b-state').val(info.address.stateId);
			$('#b-city').append("<option value='"+ info.address.cityId+ "'>" + info.address.city + "</option>");
			$('#b-loc').append("<option value='"+ info.address.locId+ "'>" + info.address.loc + "</option>");

			$('#b-lat').val(info.address.lat);
			$('#b-lonng').val(info.address.lonng);
			$('#b-cp').val(info.address.cp);

			if (info.appStep == 102)
				$('#approved-info').show();
			else if (info.appStep == 103)
				$('#rejected-info').show();
		}

		function fillSocInfo(info) {
			if (info == null)
				return;

			$('#ent').val(info.ent);
			$('#job-type').val(info.idJobType);
			$('#job').val(info.job);
			$('#earn').val(info.earn);
			$('#dependants').val(info.dependants);
			$('#ant').val(info.ant);

			// 					$('#printFormat1').show();

			$('#ent-street').val(info.address.street);
			$('#ent-ext-num').val(info.address.extNum);
			$('#ent-int-num').val(info.address.intNum);

			$('#ent-state').val(info.address.stateId);
			$('#ent-city').append("<option value='"+ info.address.cityId+ "'>" + info.address.city + "</option>");
			$('#ent-loc').append("<option value='"+ info.address.locId+ "'>" + info.address.loc + "</option>");

			$('#ent-lat').val(info.address.lat);
			$('#ent-lonng').val(info.address.lonng);
			$('#ent-cp').val(info.address.cp);
		}

		function fillProjInfo(info) {
			if (info == null)
				return;

			$('#projId').text(info.seq);

			$('#projType').val(info.idProjType);
			$('#projSet').val(info.idSetType);

			$('#proj-street').val(info.address.street);
			$('#proj-ext-num').val(info.address.extNum);
			$('#proj-int-num').val(info.address.intNum);

			$('#proj-state').val(info.address.stateId);
			$('#proj-city').append("<option value='"+ info.address.cityId+ "'>" + info.address.city + "</option>");
			$('#proj-loc').append("<option value='"+ info.address.locId+ "'>" + info.address.loc + "</option>");

			$('#proj-lat').val(info.address.lat);
			$('#proj-lonng').val(info.address.lonng);
			$('#proj-cp').val(info.address.cp);

			$('#proj-ref-one').val(info.address.streetOne);
			$('#proj-ref-two').val(info.address.streetTwo);
			$('#proj-vial-type').val(info.address.type);
		}

		function fillDocsInfo(docs) {
			if (docs == null)
				return;

			for (var i = 0; i < docs.length; i++) {
				$('#info-' + docs[i].mType.identifier).removeClass('error');
				$('#info-' + docs[i].mType.identifier).find('.item-error').hide();
				$('#info-' + docs[i].mType.identifier).attr('path', docs[i].mPath);
				$('.ainfo-' + docs[i].mType.identifier).attr('href', docs[i].mPath).show();

			}
		}

		function createAccordion(step) {

			for (var i = 1; i <= step; i++)
				$('[step=' + i + ']').show();

			$("#accordion").accordion({
				heightStyle : "content"
			});
		}

		function getAplicantFiles() {
			new Gen.AjaxCall().get('GetApplicantFiles', {
				m : "appInfo"
			}, function(a) {
				$('#ap-curp').text(a.curp);
				$('#ap-name').text(a.name);
				$('#ap-address').text(a.address);
				$('#ap-phone').text(a.phone);

				for (var i = 0; i < a.docs.length; i++) {
					$('#' + a.docs[i].identifier).removeClass('error');
					$('#' + a.docs[i].identifier).find('.item-error').hide();
					$('#' + a.docs[i].identifier).attr('path', a.docs[i].path);

				}

				hideOverlay();
			}, function(er) {

			});
		}

		showOverlay(true);

		$('input').not(':checkbox').attr('disabled', 'disabled')
		$('select').attr('disabled', 'disabled')

		Inegi.fillStates($('#b-state'));
		Inegi.fillStates($('#proj-state'));
		Inegi.fillStates($('#ent-state'));

		getApplicantInfo();

	});
</script>
</head>
<body>
	<div style="width: 1100px; margin: 0 auto">
		<div class="headerMK">
			<div class="logo">
				<span class="hdTitulo">Sistema para Aplicación de Subsidio
					2015</span>
			</div>
			<div
				style="font-size: 0.26em; top: -50px; position: relative; width: 500px; float: right; text-align: right; padding-right: 10px">
				<i>${sessionScope.LoginNombre}</i><b><a
					href="/makovo/paginas/index.jsp"> - Cerrar Sesión</a></b>
			</div>
		</div>
		<div class="divContenido">
			<a href="<%=request.getContextPath()%>/paginas/menu.jsp">Regresar
				al menú</a><br />

			<h3>Detalle de Aplicante</h3>
			<div class="detail-approve-info rejected" id="rejected-info"
				style="display: none;">Aplicante rechazado</div>
			<div class="detail-approve-info approved" id="approved-info"
				style="display: none;">Aplicante aprobado</div>
			<div>
				<div id="accordion" style="width: 900px; margin: 0px auto">
					<h3 step="2" style="display: none;">Información básica</h3>
					<div step="2" style="display: none;">
						<div style="width: 100%; padding-left: 50px;">
							<label><input type="checkbox" id="basic-info">Modificar
								información básica</label> <br /> <br />
						</div>
						<table class="basic-info" id="basic-info-container"
							style="border-spacing: 1em; border-collapse: separate; width: 100%">
							<tr>
								<td style="width: 33%">CURP:</td>
								<td style="width: 33%"><span id="curp"
									style="color: #333333;"></span></td>
								<td style="width: 33%"></td>
							</tr>
							<tr>
								<td><input type="text" id="name" class="t-box"
									placeholder="Nombre (s)" maxlength="50" val="text-spaces"></td>
								<td><input type="text" id="last-name" class="t-box"
									placeholder="Apellido Paterno" maxlength="50" val="text-spaces"></td>
								<td><input type="text" id="second-last" class="t-box"
									placeholder="Apellido Materno" maxlength="50" val="text-spaces"></td>
							</tr>
							<tr>
								<td><input type="text" id="birth" class="t-box"
									t-box-type="date" placeholder="Fecha nacimiento" maxlength="10"></td>
								<td><input type="text" id="phone" class="t-box"
									placeholder="Teléfono" t-box-type="phone" maxlength="13"
									val="text-spaces"></td>
							</tr>
							<tr>
								<td><span>Tipo de identificación:</span></td>
								<td>Estado civil:</td>
							</tr>
							<tr>
								<td><select id="idType" class="t-box">
										<option value="1">INE</option>
										<option value="2">Cartilla</option>
										<option value="3">Pasaporte</option>
								</select></td>
								<td><input type="text" id="fol-id" val="text-spaces"
									class="t-box" placeholder="Folio identificación" maxlength="20"></td>
							</tr>
							<tr>
								<td><select id="civState" class="t-box">
										<option value="1">Soltero(a)</option>
										<option value="2">Casado(a)</option>
										<option value="3">Viudo(a)</option>
										<option value="4">Divorciado(a)</option>
								</select></td>
							</tr>
							<tr>
								<td>Domicilio aplicante:</td>
							</tr>
							<tr>
								<td><input type="text" id="b-street" class="t-box"
									placeholder="Calle" maxlength="45" val="text-spaces"></td>
								<td><input type="text" id="b-ext-num" class="t-box"
									placeholder="Número externo" maxlength="10" val="text-spaces"></td>
								<td><input type="text" id="b-int-num" class="t-box"
									placeholder="Número interno" maxlength="10" val="text-spaces"></td>
							</tr>
							<tr>
								<td><select id="b-state" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="b-city" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="b-loc" class="t-box" val="selected"
									wrongOption="-1"></select></td>
							</tr>
							<tr>
								<td><input type="text" id="b-lonng" class="t-box"
									placeholder="Longitud" maxlength="11"></td>
								<td><input type="text" id="b-lat" class="t-box"
									placeholder="Latitud" maxlength="11"></td>
								<td><input type="text" id="b-cp" class="t-box"
									placeholder="Código postal" maxlength="7" val="just-numbers"></td>
							</tr>
						</table>
						<br />

					</div>
					<h3 step="3" style="display: none;">Información Socioeconómica</h3>
					<div step="3" style="display: none;">
						<div style="width: 100%; padding-left: 50px;">
							<label><input type="checkbox" id="soc-info">Modificar
								información socioeconónica</label> <br /> <br />
						</div>
						<table class="soc-info" id="soc-info-container"
							style="border-spacing: 1em; border-collapse: separate; width: 100%">
							<tr>
								<td style="width: 33%"><input type="text" id="ent"
									class="t-box" placeholder="Empresa" t-box-type="enterprise"
									maxlength="45" val="text-spaces"></td>
								<td style="width: 33%"><input type="text" id="job"
									class="t-box" placeholder="Puesto" t-box-type="enterprise"
									maxlength="45" val="text-spaces"></td>
								<td style="width: 33%"><input type="text" id="earn"
									class="t-box" placeholder="Ingreso mensual"
									t-box-type="enterprise" maxlength="12" val="number"></td>
							</tr>
							<tr>
								<td></td>
								<td></td>
								<td><span>Tipo de trabajo</span></td>
							</tr>
							<tr>
								<td><input type="text" id="dependants" class="t-box"
									placeholder="Dependientes económicos" t-box-type="enterprise"
									val="just-numbers" maxlength="4"></td>
								<td><input type="text" id="ant" class="t-box"
									placeholder="Antigüedad" t-box-type="enterprise"
									val="just-numbers" maxlength="10"></td>
								<td><select id="job-type" class="t-box">
										<option value="1">Público</option>
										<option value="2">Privado</option>
								</select></td>
							</tr>
							<tr>
								<td>Domicilio empresa:</td>
							</tr>
							<tr>
								<td><input type="text" id="ent-street" class="t-box"
									placeholder="Calle" maxlength="45" val="text-spaces"></td>
								<td><input type="text" id="ent-ext-num" class="t-box"
									placeholder="Número externo" maxlength="10" val="text-spaces"></td>
								<td><input type="text" id="ent-int-num" class="t-box"
									placeholder="Número interno" maxlength="10" val="text-spaces"></td>
							</tr>
							<tr>
								<td><select id="ent-state" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="ent-city" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="ent-loc" class="t-box" val="selected"
									wrongOption="-1"></select></td>
							</tr>
							<tr>
								<td><input type="text" id="ent-lonng" class="t-box"
									placeholder="Longitud" maxlength="11"></td>
								<td><input type="text" id="ent-lat" class="t-box"
									placeholder="Latitud" maxlength="11"></td>
								<td><input type="text" id="ent-cp" class="t-box"
									placeholder="Código postal" maxlength="7"></td>
							</tr>
						</table>
					</div>
					<h3 step="4" style="display: none;">Información del proyecto</h3>
					<div step="4" style="display: none;">
						<div style="width: 100%; padding-left: 50px;">
							<label><input type="checkbox" id="proj-info">Modificar
								información básica</label> <br /> <br />
						</div>
						<table class="proj-info" id="proj-info-container"
							style="border-spacing: 1em; border-collapse: separate; width: 100%">
							<tr>
								<td style="width: 33%">Folio de proyecto:</td>
								<td style="width: 33%"><span id="projId"
									style="color: #333333;"></span></td>
								<td style="width: 33%"></td>
							</tr>
							<tr>
								<td><select id="projType" class="t-box">
										<option value="1">Recámara adicional</option>
										<option value="2">Unidad básica de vivienda</option>
										<option value="3">Remodelación</option>
										<option value="4">Lote con servicios</option>
								</select></td>
								<td><select id="projSet" class="t-box">
										<option value="1">Urbano</option>
										<option value="2">Rural</option>
										<option value="3">SubUrbano</option>
								</select></td>
							</tr>
							<tr>
								<td>Domicilio proyecto:</td>
							</tr>
							<tr>
								<td><input type="text" id="proj-street" class="t-box"
									placeholder="Calle" maxlength="45" val="text-spaces"></td>
								<td><input type="text" id="proj-ext-num" class="t-box"
									placeholder="Número externo" maxlength="10" val="text-spaces"></td>
								<td><input type="text" id="proj-int-num" class="t-box"
									placeholder="Número interno" maxlength="10" val="text-spaces"></td>
							</tr>
							<tr>
								<td><select id="proj-state" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="proj-city" class="t-box" val="selected"
									wrongOption="-1"></select></td>
								<td><select id="proj-loc" class="t-box" val="selected"
									wrongOption="-1"></select></td>
							</tr>
							<tr>
								<td><input type="text" id="proj-lonng" class="t-box"
									placeholder="Longitud" maxlength="11"></td>
								<td><input type="text" id="proj-lat" class="t-box"
									placeholder="Latitud" maxlength="11"></td>
								<td><input type="text" id="proj-cp" class="t-box"
									placeholder="Código postal" maxlength="7"></td>
							</tr>
							<tr>
								<td><input type="text" id="proj-ref-one" class="t-box"
									placeholder="Primer referencia" maxlength="50"></td>
								<td><input type="text" id="proj-ref-two" class="t-box"
									placeholder="Segunda referencia" maxlength="50"></td>
								<td><select id="proj-vial-type" class="t-box">
										<option value="1">Calle</option>
										<option value="2">Avenida</option>
										<option value="3">Autopista</option>
								</select></td>
							</tr>
						</table>
					</div>
					<h3 step="5" style="display: none;">Documentación personal</h3>
					<div step="5" style="display: none;">
						<div style="width: 100%; padding-left: 50px;">
							<label><input type="checkbox" id="doc-info">Modificar
								documentación personal</label> <br /> <br />
						</div>
						<table class="doc-info">
							<tr>
								<td>CURP<br /> <input type="file" name="curp" /></td>
								<td>Identificación<br /> <input type="file" name="ide" /></td>
							</tr>
							<tr>
								<td>
									<div class="pdf-item error" id="info-curp" path="">
										<div class="title">CURP</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>

								</td>
								<td>
									<div class="pdf-item error" id="info-ide" path="">
										<div class="title">Identificación</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>

							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-curp" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-ide" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
							<tr>
								<td>Acta de nacimiento<br /> <input type="file" name="nac" /></td>
								<td>Acta de matrimonio<br /> <input type="file" name="mat" /></td>
							</tr>
							<tr>
								<td>
									<div class="pdf-item error" id="info-nac" path="">
										<div class="title">Acta de nacimiento</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
								<td>
									<div class="pdf-item error" id="info-mat" path="">
										<div class="title">Acta de matrimonio</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-nac" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-mat" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
							<tr>
								<td>Comprobante de Ingreso<br /> <input type="file"
									name="ing" /></td>
								<td>Comprobante de Domicilio<br /> <input type="file"
									name="dom" /></td>

							</tr>
							<tr>
								<td>
									<div class="pdf-item error" id="info-ing" path="">
										<div class="title">Comprobante de Ingreso</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>

								</td>
								<td>
									<div class="pdf-item error" id="info-dom" path="">
										<div class="title">Comprobante de Domicilio</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>

							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-ing" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-dom" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
							<tr>
								<td>Constancia de escrituras<br /> <input type="file"
									name="esc" /></td>
								<td>Cédula de información socioeconónica<br /> <input
									type="file" name="ise" /></td>
							</tr>
							<tr>
								<td>
									<div class="pdf-item error" id="info-esc" path="">
										<div class="title">Constancia de escrituras</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
								<td>
									<div class="pdf-item error" id="info-ise" path="">
										<div class="title">Cédula de información socioeconónica</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-esc" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-ise" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
						</table>
					</div>
					<h3 step="6" style="display: none;">Documentación vivienda</h3>
					<div step="6" style="display: none;">
						<div style="width: 100%; padding-left: 50px;">
							<label><input type="checkbox" id="home-info">Modificar
								documentación de vivienda</label> <br /> <br />
						</div>
						<table class="home-info">
							<tr>

								<td>Fachada del Inmueble<br /> <input type="file"
									name="inm" /></td>
								<td>Imagen Geolocalización<br /> <input type="file"
									name="geo" /></td>
							</tr>
							<tr>

								<td>
									<div class="pdf-item error" id="info-inm" path="">
										<div class="title">Fachada del Inmueble</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
								<td>
									<div class="pdf-item error" id="info-geo" path="">
										<div class="title">Imagen Geolocalización</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-inm" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-geo" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
							<tr>

								<td>Planos proyecto<br /> <input type="file" name="plp" /></td>
								<td>Presupuesto proyecto<br /> <input type="file"
									name="pdp" /></td>
							</tr>
							<tr>

								<td>
									<div class="pdf-item error" id="info-plp" path="">
										<div class="title">Planos proyecto</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
								<td>
									<div class="pdf-item error" id="info-pdp" path="">
										<div class="title">Presupuesto proyecto</div>
										<div class="item-error">Documento no disponible</div>
										<div class="type-item">PDF</div>
									</div>
								</td>
							</tr>
							<tr>
								<td><a style="display: none;" class="ainfo-plp" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
								<td><a style="display: none;" class="ainfo-pdp" href=""
									target="_blank">Ver en una nueva ventana</a><br> <br></td>
							</tr>
						</table>
					</div>
					<h3 step="7" style="display: none;">Documentación de subsidio</h3>
					<div step="7" style="display: none;">
						<table>
						</table>
					</div>
				</div>
			</div>

			<div style="width: 100%; text-align: center; margin-top: 15px;">
				<button class="t-btn large hor-opening" id="save-changes"
					type="button">Guardar cambios</button>
			</div>
		</div>

		<div id="pdf-document">
			<div id="pdf-viewer"></div>
		</div>
	</div>
</body>
</html>